﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MODEL
{


    public partial class qgzx_zm_course
    {
        #region 纯的实体对象 + ToPOCO()
        /// <summary>
        /// 纯的实体对象
        /// </summary>
        /// <returns></returns>
        public qgzx_zm_course ToPOCO()
        {
            qgzx_zm_course poco = new qgzx_zm_course()
            {

                Id = this.Id,
                CourseName = this.CourseName,
                CourseSubject = this.CourseSubject,
                CoursePurpose = this.CoursePurpose,
                CourseIntroduce = this.CourseIntroduce,
                IsOpen = this.IsOpen,
                IsPoor = this.IsPoor
                
                
            };
            return poco;
        }
        #endregion


        #region 1.0 生成 TViewModel 实体对象 +ToViewModel
        /// <summary>
        /// 生成 很纯洁的 实体对象
        /// </summary>
        /// <returns></returns>
        public ViewModel.Course ToViewModel()
        {
            ViewModel.Course poco = new ViewModel.Course()
            {
                Id = this.Id,
                CourseName = this.CourseName,
                CourseSubject = this.CourseSubject,
                CoursePurpose = this.CoursePurpose,
                CourseIntroduce = this.CourseIntroduce,
                IsOpen = this.IsOpen,
                IsPoor = this.IsPoor
            };
            return poco;
        }
        #endregion
    }
}
